package com.eshin.demo.custom;

import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.pattern.PatternLayoutEncoderBase;

public class CustomLayoutEncorder extends PatternLayoutEncoderBase<ILoggingEvent> {

	private String testParam;
	public String getTestParam() {
		return testParam;
	}
	public void setTestParam(String testParam) {
		this.testParam = testParam;
	}
	@Override
	public void start() {
		CustomPatternLayout patternLayout = new CustomPatternLayout();
        patternLayout.setContext(context);
        patternLayout.setPattern(getPattern());
        patternLayout.setKeywordPattern(testParam);
        patternLayout.setOutputPatternAsHeader(outputPatternAsHeader);
        patternLayout.start();
        this.layout = patternLayout;
        super.start();
	}
	
	
}
